home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / test / test_codecmaps_cn.py < prev    next >
Text File  |  2005-10-18  |  1KB  |  34 lines

  1. #!/usr/bin/env python
  2. #
  3. # test_codecmaps_cn.py
  4. #   Codec mapping tests for PRC encodings
  5. #
  6. # $CJKCodecs: test_codecmaps_cn.py,v 1.3 2004/06/19 06:09:55 perky Exp $
  7.  
  8. from test import test_support
  9. from test import test_multibytecodec_support
  10. import unittest
  11.  
  12. class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
  13.                    unittest.TestCase):
  14.     encoding = 'gb2312'
  15.     mapfilename = 'EUC-CN.TXT'
  16.     mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT'
  17.  
  18. class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
  19.                    unittest.TestCase):
  20.     encoding = 'gbk'
  21.     mapfilename = 'CP936.TXT'
  22.     mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \
  23.                  'MICSFT/WINDOWS/CP936.TXT'
  24.  
  25. def test_main():
  26.     suite = unittest.TestSuite()
  27.     suite.addTest(unittest.makeSuite(TestGB2312Map))
  28.     suite.addTest(unittest.makeSuite(TestGBKMap))
  29.     test_support.run_suite(suite)
  30.  
  31. test_multibytecodec_support.register_skip_expected(TestGB2312Map, TestGBKMap)
  32. if __name__ == "__main__":
  33.     test_main()
  34.